import Main from "@/components/main/main";
import store from "../store";

export const routers = [
    {
        path: "/login",
        name: "login",
        meta: {
            hide: true,
            title: "登录"
        },
        component: () => import("@/views/login/login")
    },
    {
        path: "/",
        name: "Dashboard",
        component: Main,
        meta: {
            hide: false,
            title: "Dashboard",
            icon: "md-speedometer",
        },
        children: [
            {
                path: "/Dashboard/master_workplace",
                name: "master_workplace",
                meta: {
                    hide: false,
                    title: "主控台"
                },
                component: () => import("@/views/Dashboard/master_workplace")
            },
            {
                path: "/Dashboard/workplace",
                name: "workplace",
                meta: {
                    hide: false,
                    title: "工作台",
                    permission: ['1']
                },
                component: () => import("@/views/Dashboard/workplace")
            },
        ]
    },
    {
        path: "/system",
        name: "system",
        component: Main,
        meta: {
            hide: false,
            title: "系统配置",
            icon: 'ios-build',
            permission: ['1','2']
        },
        children: [
            {
                path: "/system/menu",
                name: "system_menu",
                meta: {
                    hide: false,
                    title: "菜单维护",
                    icon: 'md-menu',
                    permission: ['2']
                },
                component: () => import('@/views/system/menu')
            },
            {
                path: "/system/user",
                name: "system_user",
                meta: {
                    hide: false,
                    title: "用户管理",
                    icon: 'ios-people',
                    permission: ['2']
                },
                component: () => import('@/views/system/user')
            },
            {
                path: "/system/auth",
                name: "system_auth",
                meta: {
                    hide: false,
                    title: "权限管理",
                    icon: 'md-lock',
                    permission: ['2']
                },
                component: () => import('@/views/system/auth')
            },
            {
                path: "/system/log",
                name: "system_log",
                meta: {
                    hide: false,
                    title: "操作日志",
                    icon: 'md-clipboard',
                    permission: ['2']
                },
                component: () => import('@/views/system/log')
            },
        ]
    },
    {
        path: "/cms",
        name: "cms",
        component: Main,
        meta: {
            hide: false,
            title: "CMS管理",
            icon: "md-cube",
        },
        children: [
            {
                path: "/cms/menu/cms_column",
                name: "cms_column",
                meta: {
                    hide: false,
                    title: "栏目列表",
                },
                component: () => import("@/views/cms/menu/cms_column")
            },
            {
                path: "/cms/content/cms_content",
                name: "cms_content",
                meta: {
                    hide: false,
                    title: "内容列表",
                },
                component: () => import("@/views/cms/content/cms_content")
            },
            {
                path: "/cms/tags/cms_tags",
                name: "cms_tags",
                meta: {
                    hide: false,
                    title: "标签管理",
                },
                component: () => import("@/views/cms/tags/cms_tags")
            },
            {
                path: "/cms/files/files_manage",
                name: "files_manage",
                meta: {
                    hide: false,
                    title: "附件管理",
                },
                component: () => import("@/views/cms/files/files_manage")
            },

        ]
    },
    {
        path: "/app",
        name: "app",
        component: Main,
        meta: {
            hide: false,
            title: "应用接入",
            icon: 'md-cloud',
            permission: ['1','2']
        },
        children: [
            {
                path: "/app/group",
                name: "app_group",
                meta: {
                    hide: false,
                    title: "应用分组",
                    icon: 'ios-archive',
                    permission: ['2']
                },
                component: () => import('@/views/app/group')
            },
            {
                path: "/app/list",
                name: "app_list",
                meta: {
                    hide: false,
                    title: "应用列表",
                    icon: 'md-list-box',
                    permission: ['2']
                },
                component: () => import('@/views/app/list')
            },
        ]
    },
    {
        path: "/interface",
        name: "interface",
        component: Main,
        meta: {
            hide: false,
            title: "接口管理",
            icon: 'ios-link',
            permission: ['1','2']
        },
        children: [
            {
                path: "/interface/group",
                name: "interface_group",
                meta: {
                    hide: false,
                    title: "接口分组",
                    icon: 'md-archive',
                    permission: ['2']
                },
                component: () => import('@/views/interface/group')
            },
            {
                path: "/interface/list",
                name: "interface_list",
                meta: {
                    hide: false,
                    title: "接口列表",
                    icon: 'md-infinite',
                    permission: ['2']
                },
                component: () => import('@/views/interface/list')
            },
            {
                path: "/interface/request",
                name: "interface_request",
                meta: {
                    hide: true,
                    title: "请求参数",
                    permission: ['2']
                },
                component: () => import('@/views/interface/request')
            },
            {
                path: "/interface/response",
                name: "interface_response",
                meta: {
                    hide: true,
                    title: "返回参数",
                    permission: ['2']
                },
                component: () => import('@/views/interface/response')
            },
        ]
    },
    {
        path: "/setting",
        name: "setting",
        component: Main,
        meta: {
            hide: false,
            title: "设置页面",
            icon: "md-options",
        },
        children: [
            {
                path: "/setting/setting_user",
                name: "setting_user",
                meta: {
                    hide: false,
                    title: "个人中心",
                },
                component: () => import("@/views/setting/setting_user")
            },
        ]
    },
    // 文档wiki s
    {
        path: "/wiki/list",
        name: "wiki_list",
        meta: {
            hide: true,
            title: "文档列表",
        },
        component: () => import('@/views/wiki/list')
    },
    {
        path: "/wiki/error",
        name: "wiki_error",
        meta: {
            hide: true,
            title: "错误码",
        },
        component: () => import('@/views/wiki/error-code')
    },
    {
        path: "/wiki/calculation",
        name: "wiki_calculation",
        meta: {
            hide: true,
            title: "算法详解",
        },
        component: () => import('@/views/wiki/calculation')
    },
    {
        path: "/wiki/login",
        name: "wiki_login",
        meta: {
            hide: true,
            title: "文档登录",
        },
        component: () => import('@/views/wiki/login')
    },
    // 文档wiki e
    {
        path: "/cms/imglist",
        name: "cms_imglist",
        meta: {
            hide: true,
            title: "CMS附件管理",
        },
        component: () => import('@/views/cms/files/imglist')
    },
]